package cn.xanderye.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created on 2020/8/3.
 *
 * @author 叶振东
 */
@RefreshScope
@RestController
@RequestMapping("main")
public class MainController {
    @Value("${user.username}")
    private String username;

    @Value("${user.password}")
    private String password;

    @RequestMapping("hello")
    public String hello() {
        return "账户：" + username + "密码：" + password;
    }
}
